package app.service.impl;

import app.dao.DaoRj;
import app.domain.Rj;
import app.service.ServiceRj;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CachePut;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional
@Service
public class ServiceRjImpl implements ServiceRj {
    @Autowired
    private DaoRj daoRj;

    //保存方法
    @CachePut(key = "#p0", value = "my-redis-cache1")
    @Override
    public void insert(Rj rj) {
        daoRj.save(rj);
    }
}
